<%@ include file="/WEB-INF/jsp/header.jsp"%>

<%
	BlobstoreService blobstoreService = BlobstoreServiceFactory
			.getBlobstoreService();
	Gallery gallery = (Gallery)request.getAttribute("gallery");
	String uploadUrl = blobstoreService.createUploadUrl("/gallery/" + gallery.getId());
%>

<h1>Galeria ${gallery.name}</h1>

<form action="<%= uploadUrl %>"
	method="post" enctype="multipart/form-data">
	<input type="file" name="myFile">
	<input type="submit" value="Submit">
</form>

<table>
	<c:forEach var="img" items="${images}">
		<tr>
			<td><img src="/blob/${img.blobKeyStr}" alt="${img.blobKeyStr}"
				height="30" width="30">
				<form action="/image/${img.id}" method="POST" >
					<input type="submit" value="Usun">
				</form></td>
		</tr>
	</c:forEach>
</table>

<%@ include file="/WEB-INF/jsp/footer.jsp"%>
